﻿using DMHelper.Logic.PlayerLogic;
using Data.Objects.Room;
using Room = DMHelper.Logic.RoomLogic.Room;

namespace DMHelper.Logic.Extensions
{
    public static class Extensions
    {
        public static PlayerCharacter ConvertToPlayerLogic(this Data.Objects.Player.PlayerCharacter player)
        {
            return new PlayerCharacter()
            {
                Active = player.Active,
                BaseInitiative = player.BaseInitiative,
                ClassIcon = player.ClassIcon,
                CurrentHp = player.CurrentHp,
                Initiative = player.Initiative,
                MaxHp = player.MaxHp,
                InitiativeDie = player.InitiativeDie,
                Name = player.Name
            };
        }

        public static Room ConvertToRoomLogic(this Data.Objects.Room.Room room)
        {
            return new Room()
                       {
                           Description = room.Description,
                           Name =  room.Name,
                           Image = room.Image
                       };
        }
    }
}